<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Forpastime < forpastime@qq.com>
// +----------------------------------------------------------------------
namespace app\partner\model;

use think\db\Query;
use think\Model;
use tree\Tree;

class AreaModel extends Model{
    //省
    public function province()
    {
        $list = $this->where('parent_id',0)->order('id asc')->select();
        return $list;
    }
    //市
    public function city($provinc_id)
    {
        $list = $this->where('parent_id',$provinc_id)->order('id asc')->select();
        return $list;
    }
    //区县
    public function country($city)
    {
        $list = $this->where('parent_id',$city)->order('id asc')->select();
        return $list;
    }
}